program test_dgetrf
  integer :: m, n, lda=3, info
  real(8),dimension(3,3) :: a
  integer, dimension(3) :: ipiv
  
  open(unit=3, file='lu.txt', status='old', action='read')
  read(3,*) a(1,:)
  read(3,*) a(2,:)
  read(3,*) a(3,:)
  
  call dgetrf(m, n, a, 3, ipiv, info)
  if(info == 0) then
     write(*,*) 'ok'
  end if
  write(*,*) a
  write(*,*) ipiv
  close(3)
end program test_dgetrf

